const isType = (type) => {
  return (obj) => {
    return Object.prototype.toString.call(obj) === `[object ${type}]`;
  };
};

const isArray = isType('Array');
const isFunction = isType('Function');
const isString = isType('String');
const isObject = isType('Object');

module.exports = { isArray, isFunction, isString, isObject };
